<div id="cart" class="btn-group btn-block">
  <button type="button" data-toggle="dropdown" data-loading-text="{{ text_loading }}" class="btn btn-inverse btn-block btn-lg dropdown-toggle">
    <span id="cart-total">{{ text_my_cart }}</span>
    <i class="iconfont">&#xe60c;</i>
    <span id="cart-count">{{ cart_count }}</span>
  </button>
  <ul class="dropdown-menu pull-right cart-content">
    {% if products or vouchers %}
    <li>
      <table class="table table-hover products">
        {% for product in products %}
        <tr>
          <td class="text-center">{% if product.thumb %} <a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-thumbnail" /></a> {% endif %}</td>
          <td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a> {% if product.option %}
            {% for option in product.option %} <br />
            - <small>{{ option.name }} {{ option.value }}</small> {% endfor %}
            {% endif %}
            {% if product.recurring %} <br />
            - <small>{{ text_recurring }} {{ product.recurring }}</small> {% endif %}</td>
          <td class="text-right quantity">x {{ product.quantity }}</td>
          <td class="text-right">{{ product.total }}</td>
          <td class="text-center"><button type="button" onclick="cart.remove('{{ product.cart_id }}');" title="{{ button_remove }}" class="btn btn-danger btn-xs"><i class="iconfont">&#xe601;</i></button></td>
        </tr>
        {% endfor %}
        {% for voucher in vouchers %}
        <tr>
          <td class="text-center"></td>
          <td class="text-left">{{ voucher.description }}</td>
          <td class="text-right">x&nbsp;1</td>
          <td class="text-right">{{ voucher.amount }}</td>
          <td class="text-center text-danger"><button type="button" onclick="voucher.remove('{{ voucher.key }}');" title="{{ button_remove }}" class="btn btn-danger btn-xs"><i class="fa fa-times"></i></button></td>
        </tr>
        {% endfor %}
      </table>
    </li>
    <li>
      <div>
        <table class="table table-bordered">
          {% for total in totals %}
          <tr>
            <td class="text-right"><strong>{{ total.title }}</strong></td>
            <td class="text-right">{{ total.text }}</td>
          </tr>
          {% endfor %}
        </table>
        <p class="text-right check-break">
          <a href="{{ cart }}"><i class="iconfont">&#xe60c;</i> {{ text_cart }}</a>&nbsp;&nbsp;&nbsp;
          <a href="{{ checkout }}"><i class="iconfont">&#xe600;</i> {{ text_checkout }}</a>
        </p>
      </div>
    </li>
    {% else %}
    <li class="empty">
      <p class="text-center"><i class="iconfont">&#xe606;</i> <span>{{ text_empty }}</span></p>
    </li>
    {% endif %}
  </ul>
</div>
